<link rel="stylesheet" type="text/css" href="../css/pintuer.css">
<link rel="stylesheet" type="text/css" href="../css/admin.css">
<link rel="stylesheet" type="text/css" href="../css/manage.css">
<?php
defined('SEJUJOPEFDNGJSL') or exit('Access denied');
$act=$_POST['act'];
if ($act=='send'){
  $pid=checkstr($_POST['pid']);
  $companyid=checkstr($_POST['companyid']);
  $log_no=checkstr($_POST['log_no']);
  $memo=checkstr($_POST['memo']);
  if(!$log_no){
    show_automsg('请填写发货信息',YMCURL.'orders');
  }
  // var_dump("update ld_order set bftime=".time().",bftype='".$companyid."',bfbianhao='".$log_no."',beizhu='".$memo."', where id=".$pid);
  // exit;
  $db->query("update ld_order set bftime=".time().",bftype='".$companyid."',bfbianhao='".$log_no."',beizhu='".$memo."',status=2  where id=".$pid,4);
  // show_automsg('发货成功！',$GLOBALARR['curl'],1);
  show_automsg('发货成功！',YMCURL.'orders');
}
$id=checkstr($_GET['id']);
$db->query("select * from ld_order where id=".$id,2);
$rs=$db->rs;
?>
<script language="javascript" type="text/javascript" src="../my97datepicker/WdatePicker.js"></script>
<div class="righttop">
  <span class="icon-home"></span> 首页 <span class="gray">/</span> 订单管理
</div>
<div class="panelbox">
    <div class="panel admin-panel">
        <div class="panel-head">
          <strong><span class="icon-edit"></span>
            发货
          </strong>
        </div>
        <div class="body-content">
            <form action="" method="post" onSubmit="return frmchk(this);">
             <input type="hidden" name="pid" value="<?php echo $rs['id'];?>">
             <input type="hidden" name="act" value="send">
              <table class="modifytable">
            <tr level="0">
            <td class="leftb">订单编号:</td>
            <td><?php echo $rs['id'];?></td>
            </tr>
            <tr level="0">
            <td class="leftb">用户名:</td>
            <td><?php echo $rs['bname'];?></td>
            </tr>
           <tr>
          <td class="leftb">详细收货地址:</td>
          <td>
             <?php echo $rs['baddress'];?>
            </td>
          </tr>
         <tr>
          <td class="leftb">收货人:</td>
          <td><?php echo $rs["bsname"];?>
         </tr>
        <tr>
          <td class="leftb">收货人联系手机:</td>
          <td><?php echo $rs["bphone"];?>
          </td>
          </tr>
        <tr>
        <td class="leftb">物流:</td>
        <td level="0_3">
        <select name="companyid" id="companyid" class="select w50">
        <option value="">请选择</option>
        <option value="申通快递">申通快递</option>
        <option value="圆通快递">圆通快递</option>
        <option value="EMS">EMS</option>
        <option value="顺丰快递">顺丰快递</option>
        <option value="中通快递">中通快递</option>
        <option value="京东快递">京东快递</option>
        <option value="宅急送">宅急送</option>
        <option value="邮政">邮政</option>
        <option value="天天快递">天天快递</option>
        <option value="德邦快递">德邦快递</option>
        <option value="其他">其他</option>
        </select>
        &nbsp;<span class="style1">*</span></td>
        </tr>
        <tr>
        <td class="leftb">物流单号:</td>
        <td level="0_3"><input type="text" name="log_no" id="log_no" class="input w50">&nbsp;<span class="style1">*</span></td>
        </tr>
        <tr level="0">
        <td class="leftb">备注:</td>
        <td><textarea name="memo" class="textarea"></textarea></td>
        </tr>
        <tr level="0">
        <td class="leftb"></td>
        <td>
        <button type="submit" class="button bg-main" name="send" value="<?php echo $id;?>" onClick="return confirm('确定发货吗?')">
            <span class="icon-check-square-o"></span> 确定发货
        </button>
        </td>
        </tr>
              </table>
              </form>
        </div>
    </div>
</div>
